package com.bw.module_mine.model

/**
 * @author zhy
 * @date 2025-09-20 10:05
 * @description
 */
data class MineModel(
    val accountStatus: Int,
    val avatarId: Int,
    val cellphone: String,
    val collections: Int,
    val comments: Int,
    val equityName: Any,
    val fansCount: Int,
    val followCount: Int,
    val friendsCount: Int,
    val gender: Int,
    val giveLikes: Int,
    val hasPassword: Boolean,
    val headImg: HeadImg,
    val hobby: String,
    val id: Long,
    val likes: Int,
    val medalImg: Any,
    val messages: Int,
    val modelImg: Any,
    val nickname: String,
    val posts: Int,
    val realname: Any,
    val relation: Int,
    val relationStatus: Int,
    val self: Boolean,
    val syPayUserNo: Any,
    val syUserId: Int,
    val username: String,
    val weChat: Any
){
    fun requireHobby(): String {
        if (hobby.isNullOrBlank()) {
            return "未添加签名"
        }
        return hobby
    }
    fun formatFriendCount(): String {
        return "朋友 $friendsCount"
    }
    fun formatFansCount(): String {
        return "粉丝 $fansCount"
    }

    fun formatFocusCount(): String {
        return "关注 $followCount"
    }
}

data class HeadImg(
    val contentLength: Int,
    val contentType: String,
    val filename: String,
    val firstImage: Any,
    val id: Int,
    val imageHeight: Int,
    val imageWidth: Int,
    val thumbnailUrl: Any,
    val url: String
)